x86/shadow: don't use map_domain_page_global() on paths that may not fail
authorJan Beulich <jbeulich@suse.com>
Mon, 18 Mar 2019 16:02:02 +0000 (17:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 Mar 2019 16:02:02 +0000 (17:02 +0100)
commit833788f4d2db3ed40005c6c42d1a49166b750b6e
treec96a18fa8e7457bd950a5b965a1db23b01c6504c
parentb77bf91e2860f88539153faec94335ce729d8f28
x86/shadow: don't use map_domain_page_global() on paths that may not fail

The assumption (according to one comment) and hope (according to
another) that map_domain_page_global() can't fail are both wrong on
large enough systems. Do away with the guest_vtable field altogether,
and establish / tear down the desired mapping as necessary.

The alternatives, discarded as being undesirable, would have been to
either crash the guest in sh_update_cr3() when the mapping fails, or to
bubble up an error indicator, which upper layers would have a hard time
to deal with (other than again by crashing the guest).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
master commit: 43282a5e64da26fad544e0100abf35048cf65b46
master date: 2019-02-26 16:56:26 +0100
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/domain.h